<template>
	<view class="singleBox sh_b" ref="singleBox" @click="jumpPage(jumpPath)">
			<view class="singleTap">
				<text :class="['iconfont',icon]" :style="{color:iconStyle}" ></text>
				<text class="iconfont icon-gengduo"   style="color:#999999;font-size:28rpx">  </text>
			</view>
			<view class="singleInfo">
				<text class="num" style="margin-right:20rpx">
					{{num}}
				</text>
				<text class="unit">
					{{unit}}
				</text>
			</view>
			
			<view class="singleLable">
				{{label}}
			</view>
			<view class="bgBox">
				<text :class="['iconfont',bg] " style="font-size: 120rpx;" :style="{color:bgStyle}"></text>
			</view>
	</view>
</template>

<script>
	export default {
		name:'cardBox',
		data() {
			return {
				
			}
		},
		props:{
			icon:{},
			iconStyle:{},
			bg:{},
			num:{},
			unit:{},
			label:{},
			jumpPath:{
				
			},
			bgStyle:{},
			tap:{}
		},
		created() {
			this.tH = uni.getStorageSync('titleHeight')
		},
		methods: {
			jumpPage(path){
				console.log(path)
				if(this.tap){
					this.$emit('tapFunction',this.tap)
					
				}else{
					uni.navigateTo({
						url:path
					})
				}
				
			}
		}
	}
</script>

<style scoped>
	.singleBox{
		padding:24rpx;
		margin:15rpx;
		box-sizing: border-box;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0,0,0,0.1);
		border-radius: 20rpx;
		position: relative;
	}
	
	.singleTap{
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.singleInfo{
		color:#333333;
		margin:25rpx 0 4rpx
	}
	.singleInfo>.num{
		font-size:48rpx;
	}
	.singleInfo>.unit{
		font-size:28rpx;
		font-weight:bolder
	}
	.singleLable{
		color:#666666;
		font-size:28rpx
	}
	.bgBox{
		position: absolute;
		right:0;
		bottom:9rpx;
	}
</style>
